﻿<%@ Page Title="" Language="C#" MasterPageFile="~/App_SiteMasterPage/Site.Master"
    AutoEventWireup="true" CodeBehind="RoutesManagement.aspx.cs" Inherits="eProject.Web.UI.RoutesManagementPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="script" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="LeftContent" runat="server">
    <div id="widget-categories" class="widget widget-categories">
        <div class="widget-inner">
            <div class="widget-title">
                <h5>
                    Routes</h5>
            </div>
            <div class="widget-content">
                <ul>
                    <li><a class="add" href="AddRoute.aspx">Add New</a></li>
                    <li><a href="RoutesManagement.aspx">List Routes</a></li>
                </ul>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="RightContent" runat="server">
    <div class="widget-title">
        <h5>
            Route Search Information :
            <asp:TextBox ID="txtSearchText" runat="server"></asp:TextBox>
            <asp:CheckBox ID="cbDelete" runat="server" Checked="false" Text="Is Deleted" />
            <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />
        </h5>
    </div>
    <div class="widget-content">
        <asp:GridView ID="grvRoutes" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"
            AllowPaging="True" ShowHeaderWhenEmpty="True" AutoGenerateColumns="False" DataKeyNames="Id"
            BorderColor="#E7E7FF" BorderStyle="Solid" BorderWidth="1px" OnPageIndexChanging="grvRoutes_PageIndexChanging"
            OnRowEditing="grvRoutes_RowEditing" OnRowDeleting="grvRoutes_RowDeleting" OnRowUpdating="grvRoutes_RowUpdating"
            Width="740px">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:TemplateField HeaderText="Edit">
                    <ItemTemplate>
                        <asp:ImageButton ID="btnEdit" runat="server" CausesValidation="False" CommandName="Edit"
                            ImageUrl="~/Images/Icons/edit.png" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:TemplateField Visible="false" HeaderText="ID">
                    <ItemTemplate>
                        <asp:Label ID="lblID" runat="server" Text='<%# Eval("Id") %>'>
                        </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Plane">
                    <ItemTemplate>
                        <asp:Label ID="lblPlane" runat="server" Text='<%# BindPlanes(Eval("PlaneId")) %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="From">
                    <ItemTemplate>
                        <asp:Label ID="lblFom" runat="server" Text='<%# BindCities(Eval("From")) %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="To">
                    <ItemTemplate>
                        <asp:Label ID="lblTo" runat="server" Text='<%# BindCities(Eval("To")) %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Distance">
                    <ItemTemplate>
                        <asp:Label ID="lblDistance" runat="server" Text='<%# Eval("Distance") + " (Km)" %>'>
                        </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Delete">
                    <ItemTemplate>
                        <asp:ImageButton ID="btnDelete" runat="server" CausesValidation="False" CommandName="Delete"
                            ImageUrl="~/Images/Icons/delete.png" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Active">
                    <ItemTemplate>
                        <asp:ImageButton ID="btnUpdate" runat="server" CausesValidation="False" CommandName="Update"
                            ImageUrl="~/Images/Icons/back.png" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
    </div>
</asp:Content>
